<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="animate.min.css">
    <style>
        *{
            margin: 0;padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        .btn{
            display: block;
            margin: 20px auto;
            width: 300px;
            height: 100px;
            background-color:#656565;
            color: white;
            line-height: 100px;
            font-size: 20px;
            text-align: center;
            display: block;
        }
        .ifa{
           width: 100%;
           height: 100%;
           display: none;
           text-align: center;
           padding-top: 50px;
        }
        .dy{
            position: absolute;
            top: 50%;
            left: 50%;
            /* width: 400px; */
            height: 100px;
            transform: translate(-50%,-50px);
            text-align: center;
            line-height: 100px;
            font-size: 30px;
            font-weight: 900;
            color: white;
            display: none;
            padding: 20px;
            background-color: #000;
        }
    </style>
</head>
<body>

    <button class="btn">请点击</button>

    <div class="ifa">
        <iframe src="http://sugt.xs3166.com/" frameborder="0" width='80%' height="80%" id="myifr"></iframe>
    </div>
    <div class="dy">恭喜你进入钓鱼网站！信息已传输！下次再见！</div>
    <script>
        let btn=document.querySelector('.btn')
        let ifa=document.querySelector('.ifa')
        let dy=document.querySelector('.dy')
        let myi=document.querySelector('#myifr')
        let body=document.querySelector('body')
        let color=['red','yellow']
        btn.addEventListener('click',()=>{
            btn.style.display='none'
            alert('欢迎进入追梦人讲堂')
            ifa.style.display='block'
            
            setTimeout(()=>{ 
                setInterval(() => {
                let index=Math.round(Math.random())
                body.style.backgroundColor=color[index]
                dy.style.display='block'
            }, 100);
            },3000)
        })

    </script>
</body>
</html>